//
//  BaseViewController.h
//  BiShang
//
//  Created by fancy on 2018/3/12.
//  Copyright © 2018年 bishang. All rights reserved.
//

#import "BSBaseViewController.h"

NS_ASSUME_NONNULL_BEGIN

//左边按钮点击回调
typedef void(^LeftNavBtnClickBlock)(void);
//右边按钮点击回调
typedef void(^RightNavBtnClickBlock)(void);
//UIAlert点击监听
typedef void(^AlertItemClickBlock)(NSInteger index);
//带输入框UIAlert点击监听
typedef void(^AlertInputItemClickBlock)(NSInteger index, NSString *inputText);

@protocol ZallBasePopVCHandle <NSObject>
@optional

- (BOOL)shouldPopViewController;

@end


@interface BaseViewController : BSBaseViewController

//是否需要返回到最底层，默认NO
@property (assign, nonatomic, getter=isNeedPopToRoot) BOOL needPopToRoot;

/**
 设置导航栏文字颜色
 */
@property (strong, nonatomic) UIColor *navTintColor;

/**
 设置导航栏图片背景
 */
@property (strong, nonatomic) UIImage *navBgImage;

/**
 设置导航栏背景颜色
 */
@property (strong, nonatomic) UIColor *navBgColor;

/**
 设置是否显示导航栏底部线条
 */
@property (assign, nonatomic) BOOL hideNavShadow;

/**
 设置是否显示导航栏
 */
@property (assign, nonatomic) BOOL hideNavigationBar;

/**
 重置左按键标题
 */
@property (strong, nonatomic) NSString *navLeftTitle;

/**
 使能左按键
 */
@property (assign, nonatomic) BOOL enableNavLeftBtn;

/**
 设置左按键文字颜色
 */
@property (strong, nonatomic) UIColor *navLeftBtnColor;

/**
 重置右按键标题
 */
@property (strong, nonatomic) NSString *navRightTitle;

/**
 使能右按键
 */
@property (assign, nonatomic) BOOL enableNavRightBtn;

/**
 设置右按键文字颜色
 */
@property (strong, nonatomic) UIColor *navRightBtnColor;

/**
 设置自定义title颜色
 */
@property (strong, nonatomic) NSString *navCustomTitleColor;

/**
 自定义文本标题
 */
@property (strong, nonatomic) NSString *navCustomTitle;

/**
 隐藏返回按钮
 
 @param hiden 是否隐藏
 */
- (void)hideNavBackBtn:(BOOL)hiden;


/**
 自我销毁
 */
- (void)destroySelfFromNav;

/**
 添加自定义左按键
 
 @param title      按键标题
 @param icon       按键icon
 @param clickBlock 点击监听
 */
- (void)addNavLeftBtnWithTitle:(NSString *)title icon:(NSString *)icon clickBlock:(LeftNavBtnClickBlock)clickBlock;

/**
 自定义左边按钮
 
 @param view      自定义按钮view
 */
- (void)addNavLeftView:(UIView *)view leftSpace:(CGFloat)leftSpace;

/**
 添加自定义右按键
 
 @param title      按键标题
 @param icon       按键icon
 @param clickBlock 点击监听
 */
- (void)addNavRightBtnWithTitle:(nullable NSString *)title icon:(nullable NSString *)icon clickBlock:(RightNavBtnClickBlock)clickBlock ;

/**
 自定义右边按键
 
 @param view      自定义view
 */
- (void)addNavRightView:(UIView *)view rightSpace:(CGFloat)rightSpace;

/**
 添加自定义标题view
 
 @param view 自定义view
 */
- (void)addNavCustomTitleView:(UIView *)view;

@end

NS_ASSUME_NONNULL_END
